package com.smart.utils {
	
	public class TimeConversion {

		public static const MILLIS_PER_MINUTE:int = 1000 * 60;
		public static const MILLIS_PER_HOUR:int = 1000 * 60 * 60;
		public static const MILLIS_PER_DAY:int = 1000 * 60 * 60 * 24;
		
		
		/**
		 *	Returns time difference between two dates in hours
		 *	
		 *	@param earlierDate The earlier of the two dates.
		 *	@param laterDate The later of the two dates.
		 *  
		 *  @return The number of hours between the two dates
		 *  
		 */
		public static function getTimeDifference(earlierDate:Date, laterDate:Date):Number {
			return (laterDate.time - earlierDate.time) / MILLIS_PER_DAY;
		}
		
	}
}